package com.jk.service.impl;

import com.jk.mapper.UserMapper;
import com.jk.service.UserService;
import com.jk.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
   @Transactional(readOnly=false,propagation= Propagation.REQUIRED)
    public void insertUser(User user) {
        userMapper.insertUser(user);
        System.out.println("consumer来的请求"+user.getUserName());
    }



}
